//
//  HomeGoodsCell.m
//  ZSYH
//
//  Created by 主事丫环 on 2019/3/11.
//  Copyright © 2019 魏堰青. All rights reserved.
//

#import "HomeGoodsCell.h"

@implementation HomeGoodsCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.layer.borderWidth = 1;
    self.layer.borderColor = [UIColor colorWithHexString:@"#F2F2F2"].CGColor;
    // Initialization code
}

-(void)refreshs:(GoodListModel *)model{
    //    @property (nonatomic, copy) NSString *factory_id;
    //    @property (nonatomic, copy) NSString *parts_details;
    //    @property (nonatomic, copy) NSString *parts_price;
    //    @property (nonatomic, copy) NSString *image_url;
    //    @property (nonatomic, copy) NSString *parts_name;
    //    @property (nonatomic, copy) NSString *Id;
    //    @property (nonatomic, copy) NSString *parts_type;
    
    if ([model.image_url hasPrefix:@"http"]) {
        [self.goodsImage sd_setImageWithURL:[NSURL URLWithString:model.image_url] placeholderImage:defaultImg];
    }else{
        sdimg(self.goodsImage, model.image_url);
    }
    
    self.price.text = [NSString stringWithFormat:@"指导价¥%@",model.parts_price];
    //self.goodsTrpe.text = [NSString stringWithFormat:@"%@",model.parts_type];
    
    self.goodsTrpe.text = @"侯保产品";
    self.goodsname.text = [NSString stringWithFormat:@"%@",model.parts_name];
}

@end
